//
//  BHHomeChoseCityCell.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/6/9.
//

import UIKit

class BHHomeChoseCityCell: UITableViewCell {
    var canChose: Bool = true {
        didSet {
            if canChose == true {
                self.text_label.textAlignment = .center
                self.text_leading.constant = 0
            }else {
                self.text_label.textAlignment = .left
                self.text_leading.constant = 15
            }
        }
    }
    
    var chose: Bool = false {
        didSet {
            if self.canChose == false {
                return
            }
            self.text_label.isHighlighted = chose
            self.text_label.backgroundColor = chose == true ? .color_f8f8f8:.white
        }
    }
    
    
    @IBOutlet weak var text_label: UILabel!
    
    @IBOutlet weak var text_leading: NSLayoutConstraint!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
